using System;
using System.IO;
using NUnit.Framework;
using MonsterNet;

namespace MonsterNetTests
{
	[TestFixture()]
	public class TestMNLocation
	{
		private string _path;
		private string _pathDestination;
		private string _pathPortable;
		
		[TestFixtureSetUp]
		public void SetupDirectory() {
			_path = Path.Combine(MNGlobal.DefaultDirectory(), @"Test");
			_pathDestination = Path.Combine(_path, @"Dest");
			_pathPortable = Path.Combine(_path, @"Portable");
			
			Directory.CreateDirectory(_pathDestination);
			Directory.CreateDirectory(_pathPortable);
		}
		
		[TestFixtureTearDown]
		public void TearDown() {
			Directory.Delete(_path, true);
		}
		
		[Test()]
		public void TestCase ()	{
			MNLocation location = new MNLocation();
			location.CurrentLocation = MNFSObjectLocation.Destination;
			location.Name = "Home";
			location.Path = _pathDestination;
			location.PortablePath = _pathPortable;
			
			MNSerialise.SaveToFile<MNLocation>(MNGlobal.DefaultDirectoryWithFilename(MNLocation.Savefilename), location);	
		
		}
	}
}

